function [positiveFlow negativeFlow] = flowRatio(VelocityMap)

% flowRatio will look at a temporal Velocity map and calculate the foward
% flow rate and negative flow rate temporally

[Rsize Csize Phase] = size(VelocityMap);
positiveFlow = zeros(Phase,1);
negativeFlow = zeros(Phase,1);

for Rindex = 1:1:Rsize
    
    for Cindex = 1:1:Csize

        for TimeIndex = 1:1:Phase
         
            if (VelocityMap(Rindex,Cindex,TimeIndex) > 0) 
                
                positiveFlow(TimeIndex) = positiveFlow(TimeIndex)...
                    + VelocityMap(Rindex,Cindex,TimeIndex);
                
            elseif (VelocityMap(Rindex,Cindex,TimeIndex) < 0)
                
                negativeFlow(TimeIndex) = negativeFlow(TimeIndex)...
                    + VelocityMap(Rindex,Cindex,TimeIndex);

            end

        end

    end

end
